// store.js

import { createStore } from 'vuex';

const store = createStore({
    state: {
        user: null, // 用户信息
    },
    mutations: {
        login(state, user) {
            state.user = user;
        },
        logout(state) {
            state.user = null;
        },
    },
});

export default store;
